import sys
sys.path.append('..\\..')
from Djoser import *


root = Tk()
f1 = Frame(root)
f1.pack()

def callback(s):
	print 'you chose number '+s

opts = ['one','two','three']
optmenu = DjOptionMenu(f1, opts,'three', callback)
optmenu.pack()

def test(n):
	if n==1:
		optmenu.currentItem = 'three'
		assert optmenu.currentItem == 'three'
Button(f1,text='Set item',command=lambda:test(1)).pack(side=LEFT)

f1.mainloop()